import request from '@/utils/request'

export function getMessageListByPage(data) {
  return request.get('/message/list', { params: data })
}

export function getAllMessage(data) {
  return request.get('/messages', data)
}

export function addMessage(data) {
  return request.post('/message', data)
}

export function updateMessage(data) {
  return request.put('/message', data)
}

export function deleteMessage(id) {
  return request.delete('/message/' + id, id)
}

export function getMessageById(id) {
  return request.get('/message/' + id)
}

export function getVerificationCode(email){
  console.log(email, 'email')
  return request.get('/getVerificationCode/' + email)
}
